﻿<%@ Page Title="" Language="VB" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
    Notification Types
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="CurrentMenuIDContent" runat="server" >configMenu</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="HeadContent" runat="server">
    <link rel="stylesheet" type="text/css" href="../../Content/jquery-ui-1.8.16.custom.css" />
    <script type="text/javascript" src="../../Scripts/jquery-ui-1.8.16.custom.min.js"></script>
    <script type="text/javascript" src="../../Scripts/site.js"></script>
    <script type="text/javascript" src="../../Scripts/jquery.tablesorter.min.js"></script>
    <script type="text/javascript" src="../../Scripts/jquery.tablesorter.pager.js"></script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <table>
        <tr>
            <td colspan="2">
                <h2 class="left">
                    Notification Types</h2>
                <div class="right">
                    <form method="get" action='<%= Html.AttributeEncode(Url.Action("Create")) %>'>
                    <input type="submit" class="button right" value="Create Notification Type" />
                    </form>
                </div>
            </td>
            <td>
                &nbsp;
            </td>
        </tr>
        <tr>
            <td width="100px">
                Filter By Role:
            </td>
            <td width="400px">
                <%= Html.DropDownList("Role", "---All---")%>
            </td>
            <td>
                &nbsp;
            </td>
        </tr>
        <tr>
            <td id="notifListContent" colspan="2">
                <% Html.RenderPartial("~/Views/Notification/Controls/NotificationGrid.ascx")%>
            </td>
            <td>
                &nbsp;
            </td>
        </tr>
    </table>
    <% Html.RenderPartial("~/Views/History/Controls/History.ascx")%>

    <script type="text/javascript">

        $(document).ready(function () {
            $("select").change(function () {
            showLoading("notifListContent",true);
                var roleID = $("#Role").val();

                jQuery.ajax({
                    type: 'POST',
                    data: { roleID: roleID },
                    url: '<%= Html.AttributeEncode(Url.Action("FilterNotification")) %>',
                    success: function (result) {
                        $('#notifListContent').html(result);
                        hideLoading("notifListContent");
                    }
                });
            });

        });

    </script>
</asp:Content>
